
<?php
/**
 *
 * @package phpBB3 anonymous
 * @copyright (c) 2007 poppertom69, phpalpha
 * @license http://opensource.org/licenses/gpl-license.php GNU Public License 
 *
 */

// If the file that requested this does not have IN_PHPBB defined or the user requested this page directly exit.
global $db, $phpbb_root_path, $phpEx;

define('IN_PHPBB', true);
$phpbb_root_path = './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.'.$phpEx);


// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup('anonymous');


$post_bot_version = '0.4.0';



		$sql_ary = array(
		'post_bot_config'		=> birthday_enable,
		'post_bot_value'	=> 1,
						);
		$sql = 'INSERT INTO ' . POST_BOT_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary);
		$db->sql_query($sql);
		
		$sql_ary = array(
		'post_bot_config'		=> birthday_forum,
		'post_bot_value'	=> 2,
						);
		$sql = 'INSERT INTO ' . POST_BOT_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary);
		$db->sql_query($sql);
		
		$sql_ary = array(
		'post_bot_config'		=> birthday_subject,
		'post_bot_value'	=> 'Happy Birthday {USERNAME}!',
						);
		$sql = 'INSERT INTO ' . POST_BOT_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary);
		$db->sql_query($sql);
		
		$sql_ary = array(
		'post_bot_config'		=> birthday_message,
		'post_bot_value'	=> 'Happy Birthday [b]{USERNAME}[/b] 

Just to inform you they are {AGE} today and I would like you to join me in saying a big Happy Birthday!',
						);
		$sql = 'INSERT INTO ' . POST_BOT_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary);
		$db->sql_query($sql);
		
		$sql_ary = array(
		'post_bot_config'		=> birthday_poster_id,
		'post_bot_value'	=> '2',
						);
		$sql = 'INSERT INTO ' . POST_BOT_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary);
		$db->sql_query($sql);
		
		trigger_error(sprintf($user->lang['POST_BOT_UPDATED'], $post_bot_version));

?>
